﻿using System;
namespace RFIDReader
{
    public class UltraLightCPublicEntity : iPublicEntity
    {
        public override bool SelectCard(ushort readerID, int timeout, RequestMode WAK)
        {
            //readerID
            return MasterRD.SelectSpecificCard(readerID, timeout, WAK, MIFARE_ULTRALC);
        }

        protected override CardResponse ReadPublicData()
        {
            byte[] pData = new byte[16];
            for (byte i = 0; i <= 16; i += 4)
            {
                LastAction = GetError(MasterRD.rf_UltraLight_Read(ReaderID, i, pData));
                Console.WriteLine("ReadULCP:{0}: {1}", LastAction, BitConverter.ToString(pData));
            }

            return LastAction;
        }

        protected override CardResponse Authenticate()
        {
            throw new System.NotImplementedException();
        }

        protected override CardResponse ReadSecureData()
        {
            throw new System.NotImplementedException();
        }

        protected override CardResponse GetError(MResponse mr)
        {
            throw new NotImplementedException();
        }
    }
}
